#include <linux/tty.h>

/*
 * This routine gets called when tty_write has put something into
 * the write_queue. It must check wheter the queue is empty, and
 * set the interrupt register accordingly
 *
 *	void _rs_write(struct tty_struct * tty);
 */
void rs_write(struct tty_struct * tty)
{
	// cli(); /* 关中断 */
	// if (!EMPTY(tty->write_q))
	// 	outb(inb_p(tty->write_q->data+1)|0x02,tty->write_q->data+1);
	// sti(); /* 开中断 */
}

void rs_init(void)
{
	// /* 串口初始化，包括设置串口中断处理函数，使能串口中断 */
	// set_intr_gate(0x24,rs1_interrupt);
	// set_intr_gate(0x23,rs2_interrupt);

	// /**
	//  * rs_table[0]; read_q = rs_queues[0] = tty_queues[24]
	//  * read_q->data = 0x3f8，对应 COM1
	//  */
	// init(tty_table[64].read_q->data);
	// /**
	//  * rs_table[1]; read_q = rs_queues[3] = tty_queues[27]
	//  * read_q->data = 0x2f8，对应 COM2
	//  */
	// init(tty_table[65].read_q->data);
	// outb(inb_p(0x21)&0xE7,0x21); /* 打开8259A上的串行口1和串行口2的中断 */
}